<template>
  <div class="panel">
    <div class="title">
      <span>{{ title }}</span>
      <slot name="btn"></slot>
    </div>
    <el-divider></el-divider>
    <div class="content">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: "标题",
    },
  },
};
</script>

<style lang="less" scoped>
.panel {
  width: auto;
  min-height: 300px;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 0 1px 0;

  .title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: auto;
    padding: 0 15px;
    height: 50px;
    border-bottom: 1px solid #eee;
  }

  .content {
    padding: 15px;

  }
}

.el-divider--horizontal {
  margin: 0;
}
</style>